package sctu.edu.java.year2016.team01.chenhong.day20160524.chapter7_3;

/**
 * Created by Administrator on 2016/5/24.
 * 根据运行参数个数决定循环打印变量i的次数
 */

import java.util.Scanner;

public class Student {
    public int no;
    public String name;
    public int age;



    public Student(int no, String name, int age) {
        this.no = no;
        this.name = name;
        this.age = age;
    }




    public void S() {
        System.out.println("学生基本信息：" + no + name + age);


    }

    public static void main(String[] args) {

        for (int i = 1; i <= 3; i++) {

            System.out.println("请分别输入学生学号，名字，年龄：");
            Scanner scan = new Scanner(System.in);

            int no = scan.nextInt();
            String name = scan.next();
            int age = scan.nextInt();


            Student E = new Student(no, name, age);

            E.S();
        }



        System.out.println("");


    }
}